package com.learning.sims.status;

import android.util.Log;

import com.learning.sims.people.People;

/**
 * Created by xie on 2017/4/22.
 */

public class GotoSleepStatus implements IStatus {

    private double distance = 10;
    private int count = 0;

    @Override
    public void doSomething(long time, People people) {

        if(count > (distance/people.getWalkSpeed())){
            count = 0;
            people.setStatus(Status.Sleep);
        }else{
            people.setEnergy(people.getEnergy() - people.getWalkSpendEnergyRate());
            Log.d("Sims","gotoSleep = "+people.getEnergy());
            count++;
        }

    }

}
